-
Notifications
You must be signed in to change notification settings - Fork 4.9k
feat: pause on --debug
#38345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: pause on --debug
#38345
Conversation
|
gotta figure out what to do about |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "MCP"2 failed 2608 passed, 116 skipped Merge workflow run. |
Test results for "tests 1"3 failed 10 flaky40326 passed, 789 skipped Merge workflow run. |
|
|
||
| _emitErrors() { | ||
| const errors = this.errors.slice(this._reportedError); | ||
| this._reportedError = this.errors.length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| this._reportedError = this.errors.length; | |
| this._reportedError = Math.max(this._reportedError, this.errors.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this just being defensive, or is there a race here that I don't see?
| return; | ||
| const { result } = data; | ||
| for (const error of params.errors) | ||
| addLocationAndSnippetToError(this._config.config, error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't internal reporter do this already, upon reporter.onTestEnd? I am afraid we'll get double snippets. Perhaps this should be handled specifically in onTestPaused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved all result/step snippet adding into dispatcher, that's the cleanest way of doing things I think.
| } | ||
|
|
||
| onStepBegin(test: TestCase, result: TestResult, step: TestStep) { | ||
| this._addSnippetToTestErrors(test, result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this will definitely produce double snippets. We should figure out this part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you say "produce double snippets", you mean that we wastefully compute them twice, right? Because I don't see how we store them multiple times
| expect(result.exitCode).toBe(0); | ||
| expect(result.passed).toBe(1); | ||
| }, { debug: true }, { PLAYWRIGHT_FORCE_TTY: 'true' }); | ||
| await testProcess.waitForOutput('Paused at End'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we need some way to resume, in case I'd like to debug fixture teardown or global teardown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The future will show!
No description provided.